﻿using System;
using System.Collections.Generic;
using Soft000.Model;
using Soft000.IDAL;
using Soft000.Data;
using System.Text;
using System.Data;
using System.Data.OleDb;
using Soft000.Model;


namespace Soft000.AccessProvider
{
    public class Home:Base<HomeInfo>,IHome
    {
        public Home()
        {
            TableName = "home";
            KeyField = h_Id;
        }
        public string GetLockIp()
        {
            string strSql = "select top 1 lockip from "+TableName;
            object obj = DbHelper.ExecuteNonQuery(CommandType.Text, strSql);
            if (obj == null || Convert.IsDBNull(obj))
            {
                return "";
            }
            return obj.ToString();
        }
        public HomeInfo GetHomeInfo()
        {
            string strSql = "select top 1 * from " + TableName;
            return GetInfoBySql(strSql);
        }
    }
}
